/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fileoperate;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 *
 * @author Administrator
 */
public class OutputsDemo {
    public static void main(String[] args) throws FileNotFoundException {
        File file=new File("c:\\","text.txt");
        FileOutputStream f = new FileOutputStream(file,false);
        PrintlnWriter p = new  PrintlnWriter(f,true);
        
        p.println("hello");
        p.println("world!");
        p.println("你已经向文件输出了两行数据");
        System.out.println("");
        
        
        
        
        
        
        
    }

}
